<?$this->load->view('admin/tools/admin-header')?>
<?$this->load->view('admin/tools/admin-menu')?>
<?=$xinha_inclusion?>

<?foreach ($query as $row)
		{
			$id			= $row->id;
			$judul		= $row->judul;
			$isi	 	= $row->isi;
			$penulis	= $row->penulis;
			$file_name	= $row->file_name;
			$status		= $row->status;
			$date		= $row->tanggal;
			$pilih		= "SELECTED";
		}?>
			
<div class="wrap">
	<a><div id="icon-index" class="icon32"><br /></div></a><br>
<h3><a>Edit -> Posting</a></h3>
<?if(!(empty($mode))){echo"<div id='message' class='updated fade'><p>$pesan</p></div>";}?>
<div id="dashboard-widgets-wrap">
<form action="<?=site_url('administrator/update_berita')?>" method='POST' enctype="multipart/form-data">
<table width="90%" border="0">
<tr valign="top">
<td width="60%">
<div>
<h3><label for="title">Judul Posting</label></h3>
<input type="text" name="berita_judul" size="30" value="<?=$judul?>" style="width:100%"/>
<input type="hidden" name="id" size="30" value="<?=$id?>" />
</div>
<div>
<h3><label for="gambar utama">Gambar Utama</label></h3>
<input type="hidden" name="gambar" value="<?=$file_name?>"/>
<input type="file" name="userfile" size="50"/>
</div>
<div style="float:left">
<h3><label for="title">Isi Posting</label></h3>
<textarea id="teks" cols="80" rows="25" name="berita_isi"><?=$isi?></textarea>
</div>
</td>

<td  style="float:right;background-color:#464646;" width="40%">
<div class="submitbox" id="submitpage">
<div class="submit">
<strong><label for='post_status'>Kategori</label></strong><br>
<select name='kategori' id='post_kategori' style="width:100%">
<option value='Berita'>Berita</option>
<option value='Tokoh'>Tokoh</option>
</select>
<br><br>


<strong><label for='post_status'>Status</label></strong><br><br>
<select name='berita_status' tabindex='6' id='post_status' style="width:100%">
<option value='publish' <?if($status=="publish"){echo $pilih;}?>>Publish</option>
<option value='unpublish' <?if($status=="unpublish"){echo $pilih;}?> >Unpublish</option>
</select>
<br><br>
<strong><label for='post_status'>Tanggal</label></strong><br><br>
<input type="text" name="berita_tanggal" size="12" id="DateAgenda" value="<?=$date;?>" readonly><input type="button" onClick="SelectDate('Date1')" value="Set">
<?if($file_name!=""){?>
<br><br>
<strong><label for='post_status'>Gambar Utama</label></strong><br><br>
<img src="<?=base_url()?>/pictures/main_picture_news/<?=$file_name;?>" width="100%"><br><br><br>
<?}?>
<input type='submit' class="button-primary"  name='submit' value='Perbarui Artikel'>

</div>
</div>
</td>
</tr>
</table>
</form>
</div>
</div><!-- wrap -->
<div class="clear"></div></div><!-- wpbody-content -->
<div class="clear"></div></div><!-- wpbody -->
<div class="clear"></div></div><!-- wpcontent -->
</div><!-- wpwrap -->

<!--admin-footer-->
<?$this->load->view('admin/tools/admin-footer');?>
<!--admin-footer-->
